<template>
  <div>
    <el-table
      v-loading="loading"
      :data="postList"
    >
      <el-table-column label="执勤点名称" align="center" prop="name"/>
      <el-table-column
        label="所在地区"
        align="center"
        prop="address"
      />
<!--      <el-table-column-->
<!--        label="操作"-->
<!--        align="center"-->
<!--        class-name="small-padding fixed-width"-->
<!--        width="100"-->
<!--      >-->
<!--        <template slot-scope="scope">-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            @click="handleViewTeam(scope.row)"-->
<!--            v-hasPermi="['system:team:list']"-->
<!--          >立即调出-->
<!--          </el-button>-->
<!--        </template>-->
<!--      </el-table-column>-->
    </el-table>
  </div>
</template>

<script>
import {
  listStagnationPoint,
  delStagnationPoint,
  userPointBelong
} from "@/api/system/stagnation_point";

export default {
  name: "StagnationPoint",
  dicts: ['sys_stagnation_type'],
  props: ['paramId'],
  components: {},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 岗位表格数据
      postList: [],
      // 查询参数
      queryParams: {
        userId: this.paramId
      },
    };
  },
  watch: {},
  created() {
    this.getList()
  },
  methods: {
    handleViewTeam(){
      this.$message.error('功能开发中')
    },
    /** 查询岗位列表 */
    getList() {
      this.loading = true;
      userPointBelong(this.queryParams).then(response => {
        this.postList = response.data;
        this.loading = false;
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      this.$modal.confirm('是否确认删除执勤点为"' + row.name + '"的数据项？').then(function () {
        return delStagnationPoint(row.id);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      });
    },
  }
};
</script>
<style lang="scss" scoped>
.points-map {
  height: 400px;
}

.points-map__tip {
  color: #010101;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.point-radius {
  margin-bottom: 20px;
  padding: 0 20px;

  .point-radius__len {
    margin-top: 10px;
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    color: #010101;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
  }
}

.mapBox {
  margin-bottom: 20px;
  padding: 0 20px;
}
</style>
